package com.draven.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.draven.product.entity.Product;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface ProductMapper extends BaseMapper<Product> {
    @Select("select stock from products where id = #{id}")
    Integer selectStockById(Long id);

    @Select("select * from products")
    List<Product> productPage();
}
